package threads;

public class UneThread
    extends Thread
{
  public UneThread(String str)
  {
    super(str);
  }

  public void run()
  {
    for (int i = 0; i < 10; i++)
    {
      System.out.println(i + " " + getName());
      try
      {
        sleep((int)(Math.random() * 10));
      }
      catch (InterruptedException e)
      {
        System.out.println("Le programme est interrompu");
      }
    }
    System.out.println(getName() + " est finie");
  }
}
